package com.tukez.tmdb.query

object Rating {
  val min: Double = 0
  val max: Double = 10
}

case class RatingBetween(min: Double, max: Double) {
  if (min > max) throw new IllegalArgumentException("min must be less or equal to max, min: " + min + " max: " + max)
  if (min < Rating.min || min > Rating.max || max < Rating.min || max > Rating.max) {
    throw new IllegalArgumentException("rating must be between " + Rating.min + " and " + Rating.max)
  }
}